package com.jinyu.jyly.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jinyu.jyly.R;
import com.jinyu.jyly.bean.MallListInfo;

import java.util.List;


/**
 *
 */
public class MineMallOrderTabAdapter extends BaseQuickAdapter<MallListInfo, BaseViewHolder> {

    public MineMallOrderTabAdapter(List<MallListInfo> data, int layoutResIds) {
        super(layoutResIds, data);
    }


    @Override
    protected void convert(final BaseViewHolder helper, final MallListInfo item) {

        helper.setText(R.id.tv_title, item.getName());
        helper.setText(R.id.tv_price, item.getPrice() + "");
//
//        helper.setText(R.id.tv_num_01, "共" + item.getNum() + "件产品");
        helper.setText(R.id.tv_all_price, "￥" + item.getPrice());
//        helper.addOnClickListener(R.id.tv_go_shouhuo);


        RequestOptions options = new RequestOptions();
        options.error(R.mipmap.space_list);
        Glide.with(mContext).load(item.getThumb())
                .apply(options)
                .into((ImageView) helper.getView(R.id.iv_img));



    }


}


